package pais.robot.keyextr;

import java.util.StringTokenizer;

import pasys.error.PaposException;

/**
 * Keyword Extractor
 * 
 * Extracts keywords from a string text
 */
public interface KeywordExtractor {
  /** Set the text to extract keywords
   * @param text - the text from where KeywordExtractor tries to extract keyword
   * @param offsetInDocument - the offset of the text in the document 
   */
  public void setText(String text, int offsetInDocument);

  /** Set KeywordListener to where each keyword is sent
   * @listener - the KeywordListener
   */
  public void setKeywordListener(KeywordListener listener);

  /** Extract all keywords 
   * 
   * Each time a keyword is found from the text which was given to setText method,
   * listener.onKeyword is invoked.
   */
  public void extractAll() throws PaposException ;

}
